<?php


namespace App\Request\client;


use App\Request\CommonRequest;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;

class CallBackRequest extends CommonRequest
{
    protected $name = '消息回调验证';

    protected $rule = [
        'appMessageToFriend' => [
            'key' => 'required|max:255',
        ],
        'appAddFriendCallBack' => [
            'mobile' => 'required|max:255',
            'numberStr' => 'required|max:255',
            'callback' => 'required|max:255',
        ],
        'appAddFriend' => [
            'mobile' => 'required|max:255',
            'numberStr' => 'required|max:255'
        ]
    ];

    protected $message = [
        'key.required' => '消息编码不能为空',
        'mobile.required' => '手机号码不能为空',
        'numberStr.required' => '任务批次号不能为空',
        'callback.required' => '添加好友结果信息不能为空',
    ];


    /**
     * 验证
     * @param array $params
     * @param string $scenes
     * @return bool
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     */
    public function validated(array $params, string $scenes): bool
    {
        return $this->__validated($params, $scenes);
    }
}